package com.bailiban.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author zhulang
 * @Classname YesterdayIncreased
 * @Description TODO
 * @Date 2020/3/13 23:07
 */
@Data
@Entity
@Table(name = "tab_yesterday_increased")
public class YesterdayIncreased  implements Serializable {
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "yesterday_id")
    private Integer yesterdayId;
    /**
     * 确认人数
     */
    private Integer confirmedCount;
    /**
     * 疑似人数
     */
    private Integer suspectedCount;
    /**
     * 治愈人数
     */
    private Integer curedCount;
    /**
     * 死亡人数
     */
    private Integer deadCount;
    /**
     * 当前在诊人数
     */
    private Integer currentConfirmedCount;
    /**
     * 日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Temporal(TemporalType.DATE)
    private Date date;
    /**
     * 多对一
     */
    @ManyToOne(targetEntity =ProvinceCov.class )
    @JoinColumn(name = "province_yesterday_id",referencedColumnName = "province_id")
    private ProvinceCov provinceCov;

}
